package cn.hbnu.array;


import java.util.Scanner;

public class ArrayDemo02 {
    public static void main(String[] args) {
        //1.输入五个数存入数组
        Scanner sc = new Scanner(System.in);
        int arr[] = new int[6];
        int n;
        n=sc.nextInt();
        int t=100000;
        for (int i = 0; i <= 5; i++) {
            arr[i] = n/t;
            arr[i]=(arr[i]+5)%10;
            t/=10;
        }
        //2.交换数据
        for ( int i=0,j=5;i<=j;i++,j--){
            int temp=arr[i];
            arr[i]=arr[j];
            arr[j]=temp;
        }

        //3.输出
        for (int i = 0; i <= 4; i++) {
            System.out.print(arr[i] + " ");
        }

    }
}